//package com.example.tool.web.sf;
//
//import com.dingtalk.open.app.api.callback.OpenDingTalkCallbackListener;
//import lombok.extern.slf4j.Slf4j;
//import shade.com.alibaba.fastjson2.JSON;
//import shade.com.alibaba.fastjson2.JSONObject;
//
//@Slf4j
//public class BotExample {
//
//
//    public static void main(String[] args) throws Exception {
////        OpenDingTalkClient client = OpenDingTalkStreamClientBuilder
////                .custom()
////                .credential(new AuthClientCredential("ding6qlkck5n9vm3n0wm", "GwTp73xf7sX6xA_t276vMLxbE2Ym1bTKnei_Y0zIe9Fl4AdYibI2IJVa5lrft-vj"))
////                .registerCallbackListener("/v1.0/im/bot/messages/get", new RobotMsgCallbackConsumer())
////                .build();
////        client.start();
//
//
//    }
//
//
//    public static class RobotMsgCallbackConsumer implements OpenDingTalkCallbackListener<JSONObject, JSONObject> {
//
//        /*
//         * @param request
//         * @return
//         */
//        @Override
//        public JSONObject execute(JSONObject request) {
//            System.out.println(JSON.toJSONString(request));
//            try {
//                JSONObject text = request.getJSONObject("text");
//                if (text != null) {
//                    //机器人接收消息内容
//                    String msg = text.getString("content").trim();
//                    String openConversationId = request.getString("conversationId");
//                }
//            } catch (Exception e) {
//                log.error("receive group message by robot error:" +e.getMessage(), e);
//            }
//            return new JSONObject();
//        }
//    }
//}
